<template>
  <div>
    <div class="baseform">
      <el-form :label-position="labelPosition" label-width="80px" :model="from">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="当事人" >
              <el-input v-model="from.party" placeholder="请输入当事人姓名" suffix-icon="fa fa-user" ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="当事人证件号">
              <el-input v-model="from.partyCardNo" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="当事人联系地址" >
              <el-input v-model="from.partyAddress" placeholder="请输入" suffix-icon="fa fa-map-marker"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="年龄" >
              <el-input v-model="from.partyAge" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="性别">
              <el-select v-model="from.partySex" placeholder style="width: 100%">
                <el-option
                  v-for="item in sexList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="联系电话">
              <el-input v-model="from.partyTel" placeholder="请输入" suffix-icon="fa fa-phone"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
             <el-form-item label="民族">
              <el-select v-model="from.partyNation" placeholder style="width: 100%">
                <el-option
                  v-for="item in nationlist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="从业资格编号" placeholder="请输入">
              <el-input v-model="from.partyQuaNum" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="当事人-法定代表" placeholder="请输入">
              <el-input v-model="from.partyLega" placeholder="请输入"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="当事人职务">
              <el-select v-model="from.partyPost" placeholder style="width: 100%">
                <el-option
                  v-for="item in positionlist"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
  </div>
</template>
<script>
import dictCache from "@/assets/utils/cache-dict-util";
import FormBtns from "@/views/comps/zhzf/form-btns";
import { mapActions } from "vuex";
export default {
  components: { FormBtns },
  props: [
    "nationlist",
    "sexList",
    "positionlist",
    "systemList",
  ],
  data() {
    return {
      labelPosition: "right",
      from: {}
    };
  },

  mounted() {
    //   this.initPage();
  },
  methods: {
    ...mapActions("d2admin/page", ["close"]),
    initPage(detail) {
      this.from = detail;
      console.log('当事人',detail)
      // if(this.form)
    },
    add(){},
    cancle() {
      this.close({ tagName: "/case/reg/detail" });
    },

    async initPage(detail) {
        this.from = detail;
    }
  }
};
</script>
<style lang="scss">
.baseform {
  padding: 0px 20%;
}
</style>
